def name = [one: '张三', two: '李四', three: '王五']
assert name['one'] == '张三'
assert name.two == '李四'

def key = 'name'
def person = [key: '张三']
assert person.containsKey('key')
person = [(key): '张三']
assert person.containsKey('name')